{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "b12ba295",
   "metadata": {},
   "source": [
    "# 创建条形图\n",
    "在 Pyplot包中，使用 bar() 函数绘制条形图："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "917371e9",
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "9f6657ab",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKeklEQVR4nO3dbYxlB13H8d/fLgilopAOCLTL1ARLCD6gEx/Ah9hirNZYTPqiTSDVYPZVFQxRV9/0bU0MwUQj2SBaEalJIZFYgxAqwQfSuFtKpK0IlhWLQBc08SGY0vr3xd4mZWxnZu+9u5f/+Pkkm7n3zJ17/jm5+52Tc8+5U90dAOb5uk0PAMByBBxgKAEHGErAAYYScIChjlzIlV166aW9vb19IVcJMN6pU6e+2N1bu5df0IBvb2/n5MmTF3KVAONV1T892XKHUACGEnCAoQQcYCgBBxhKwAGGEnCAofYNeFW9vaoerqqPP2HZc6vqA1X1ycXX55zfMQHY7SB74L+f5Jpdy44n+WB3vyTJBxf3AbiA9g14d384yb/uWnxdktsWt29L8pr1jgXAfpa9EvP53f25xe3PJ3n+Uz2wqo4lOZYkR48eXXJ1wGTbx+/c9AgbdfrWa8/L8678Jmaf/ZM+T/lnfbr7RHfvdPfO1tb/uZQfgCUtG/AvVNULkmTx9eH1jQTAQSwb8PcmuWlx+6Ykf7KecQA4qIOcRviuJB9JcmVVPVRVr09ya5IfrapPJnn14j4AF9C+b2J2941P8a2r1zwLAOfAlZgAQwk4wFACDjCUgAMMJ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aFXdnOTPk1yU5O3dfd/aJvvaM/4w0IbZfqux/VZzKLff0m9iArBZrsQEGErAAYYS8AOoqtdUVVfVSzc9yzRV9VhV3VtVH6uqe6rqlZueaZKq+uaqur2q/rGqTlXVn1XVt256rgme8Nq7b/H6e1NVHarmOQZ+AFX1x0lemOSu7r5l0/NMUlX/2d2XLG7/WJJf6+4f3vBYI1RVJfmbJLd191sXy74jybO7+y83OtwAu157z0vyR0n++jD9Hz5Uv43Oh6q6JMkPJHl9zp4qyfKeneTfNj3EID+S5CuPxztJuvtj4n3uuvvhnL0i/ObFL8ZD4bxfiXkIXJfkfd39D1X1par67u4+temhBnlmVd2b5BlJXpDkqs2OM8rLk3itrUl3P7j4EL7nJfnCpudZB3vg+7sxZz+oK4uvN25wlom+3N3f2d0vTXJNkj84THtAsEn2wPdQVc/N2T3Gb6uqztkLlrqqfqm9eXDOuvsjVXVpkq0kD296ngHuS3L9poc4LKrqW5I8lkP02rMHvrfrk7yju1/c3dvdfXmSTyf5wQ3PNdLiLJ6Lknxp07MMcVeSr198omeSpKq+vaq8/s5RVW0leWuS3zpMO1/2wPd2Y5Jf37Xs3YvlH77w44z0+DHwJKkkN3X3YxucZ4zu7qr66SRvqapfSfLfSU4neeMm5xrk8dfe05I8muQdSd680YnWzGmEAEM5hAIwlIADDCXgAEMJOMBQAg4wlIADDCXgAEP9Lzn6DDod0FEIAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.array([\"A\", \"B\", \"C\", \"D\"])\n",
    "y = np.array([3, 8, 1, 10])\n",
    "\n",
    "plt.bar(x,y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "691b7050",
   "metadata": {},
   "source": [
    "bar() 函数采用描述条形布局的参数。\n",
    "\n",
    "类别及其值由第一个和第二个参数表示为数组。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "a354a463",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<BarContainer object of 2 artists>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAASWUlEQVR4nO3df6zdd33f8eerzg/YAiSQO9fYTm8aXGjKiiFXgQ00ZYloQ9jmtII0FioWiuRWChK0iDUpk0q7RQN1NBtbl8ngNAYBwSPN4oXQNkuCWNYmwQHH5AcMl4TFnhNfQkhBlAyb9/44n0tPbu71PfennQ/Ph3R0vt/35/P9fj9HOvd1vv74e843VYUkqS8/dawHIElaeoa7JHXIcJekDhnuktQhw12SOnTCsR4AwOmnn17j4+PHehiS9Jxy7733fquqxmZqOy7CfXx8nN27dx/rYUjSc0qSb87W5rSMJHXIcJekDhnuktQhw12SOmS4S1KHDHdJ6tDI4Z5kVZIvJ7m5rZ+Z5O4k+5J8OslJrX5yW9/X2seXaeySpFnM58z9XcBDQ+sfBK6uqpcBTwKXtfplwJOtfnXrJ0laQSOFe5J1wJuBj7b1AOcDn2lddgAXt+VNbZ3WfkHrL0laIaN+Q/XfA/8SeEFbfwnwnao63Nb3A2vb8lrgUYCqOpzkqdb/W8M7TLIV2ApwxhlnLHD4MH7FZxe8rfr3yAfefKyHIB0Tc565J/lnwKGquncpD1xV26pqoqomxsZm/GkESdICjXLm/nrgXyS5CHge8ELgPwCnJjmhnb2vAw60/geA9cD+JCcALwKeWPKRS5JmNeeZe1VdWVXrqmocuBS4vareBtwBvKV12wLc1JZ3tXVa++3ljVolaUUt5jr33wF+O8k+BnPq21t9O/CSVv9t4IrFDVGSNF/z+snfqvo88Pm2/A3g3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kL/BXw0ar64oJfhXoxNee+B/g0sKWqjjAI1env0xuZ4QIABmfvUycns72/Z7pqZjttViHJOIOftf3xJZBV9TCD/7R9LfBLwP1J7mPwcyfvrarHRnyNXfPnBySpQ565S1KHDHdJ6pDhLkkdMtwlqUOGuyR1yHCXpA4Z7pLUof8Ptqn7+nyiC0YAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = [\"APPLES\", \"BANANAS\"]\n",
    "y = [400, 350]\n",
    "plt.bar(x, y)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1ea261f5",
   "metadata": {},
   "source": [
    "# 水平条形图\n",
    "如果条形水平显示而不是垂直显示，请使用 barh() 函数："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "3696e37e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWsAAAD4CAYAAAAqw8chAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKf0lEQVR4nO3db4xld13H8c/XKUoL6SppqbhtGEzQpqFSZGMQRKWQWFNjMTGkTTSNIdknomiMZvUJD9kHBv9EI2kQLYg0pkAklqAGTIyJIU5LyVJqEUuBLq0F1JXYJtDl64OZSll2s7PtPXP323m9nsyd05vf/Z7d7nvPnnPP3OruAHB++451DwDA2Yk1wABiDTCAWAMMINYAA1yw1MKXXHJJb25uLrU8wDPSnXfe+eXuvvTU7YvFenNzM1tbW0stD/CMVFWfO912p0EABhBrgAHEGmAAsQYYQKwBBhBrgAHEGmAAsQYYYLGbYo4dP5HNI3cstTzAeemBo9cvsq4ja4ABxBpgALEGGECsAQYQa4ABxBpgALEGGECsAQYQa4ABxBpgALEG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vt1fVv1bVvVX1o+ueaS9V1a/v/L//yap6b1U9e90zLamq3llVj1TVJ5+07XlV9fdV9W87X79nFa+10lhX1UaSP07y00muSnJTVV21ytc4zz2e5De6+6okr0jyy/ts/5/w5iT3rnuINfmDJB/u7iuTvDT76Nehqg4m+dUkh7r7JUk2kty43qkW9+dJrjtl25EkH+nuFyf5yM73T9uqj6x/JMlnuvv+7v5aktuS3LDi1zhvdfdD3X3XzuOvZvsP6sH1TrW3quryJNcnece6Z9lrVXUgyY8n+dMk6e6vdfd/r3WovXdBkgur6oIkFyX54prnWVR3/2OS/zxl8w1Jbt15fGuS16/itVYd64NJvvCk7x/MPovVE6pqM8nLknxszaPstd9P8ltJvrHmOdbhRUm+lOTPdk4DvaOqnrPuofZKdx9P8rtJPp/koSQnuvvv1jvVWlzW3Q/tPH44yWWrWNQFxgVU1XOTvC/Jr3X3/6x7nr1SVT+T5JHuvnPds6zJBUl+OMmfdPfLkvxvVvRP4Al2zs3ekO2/tL4vyXOq6hfWO9V69fZ7o1fy/uhVx/p4kiue9P3lO9v2jap6VrZD/Z7ufv+659ljr0rys1X1QLZPgV1bVX+x3pH21INJHuzuJ/41dXu2471fvC7JZ7v7S9399STvT/LKNc+0Dv9RVS9Ikp2vj6xi0VXH+l+SvLiqXlRV35ntiwsfXPFrnLeqqrJ9vvLe7n7buufZa9392919eXdvZvv3/qPdvW+OrLr74SRfqKof3Nn02iSfWuNIe+3zSV5RVRft/Fl4bfbRBdYn+WCSm3ce35zkr1ex6Ep/6l53P15Vb0ryt9m+EvzO7r5nla9xnntVkl9Mcqyq7t7Z9jvd/aH1jcQe+5Uk79k5WLk/yS+teZ49090fq6rbk9yV7XdGfTzP8FvPq+q9SX4yySVV9WCStyQ5muSvquqNST6X5A0reS23mwOc/1xgBBhArAEGEGuAAcQaYACxBhhArAEGEGuAAf4PqGv9X/pfzqIAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.array([\"A\", \"B\", \"C\", \"D\"])\n",
    "y = np.array([3, 8, 1, 10])\n",
    "\n",
    "plt.barh(x, y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "13ce0747",
   "metadata": {},
   "source": [
    "# 条形图颜色\n",
    "bar() 和 barh() 使用关键字参数 color 来设置条的颜色："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "c60ebe00",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKXklEQVR4nO3dbYxlB13H8d/fLgilopAOCG2XrQlCCD6gEx/Ah9hirA+xmPRFm2CqIdlXKBiiVt/0rSaGYKKRbBCtiNSkkEiIQQiV4ANp3C0l0lYEC0IR6IImisGU1r8v9jZZxnZm9t6ze/kvn0+ymXvP3Jnzz8nd75yce8691d0BYJ5v2PYAAKxHwAGGEnCAoQQcYCgBBxjqyIVc2eWXX97Hjh27kKsEGO/UqVNf6O6dvcsvaMCPHTuWkydPXshVAoxXVf/6eMsdQgEYSsABhhJwgKEEHGAoAQcYSsABhjow4FX15qp6qKo+ctayZ1bVe6vqY6uvzzi/YwKw12H2wP84yXV7lt2S5H3d/fwk71vdB+ACOjDg3f2BJP++Z/H1SW5b3b4tySuWHQuAg6x7Jeazu/uzq9ufS/LsJ3pgVR1PcjxJjh49uubqgNGqtj3Bdp2nD87Z+EXMPvORPk84XXef6O7d7t7d2fl/l/IDsKZ1A/75qnpOkqy+PrTcSAAcxroBf2eSm1e3b07yF8uMA8BhHeY0wrcl+WCSF1TVg1X1qiS/leTHq+pjSV6+ug/ABXTgi5jdfdMTfO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mOSdy4zFgAHWfsQSnc/UlWvTvJXSS5J8ubuvnexyb72jD8MtGW232Zsv81clNuvunvbMwCwBldiAgwl4ABDCfghVNUrqqqr6oXbnmWaqnq0qu6pqg9X1d1V9dJtzzRJVX1rVd1eVf9SVaeq6i+r6tu3PdcEZz337l09/15XVRdV8xwDP4Sq+vMkz01yZ3ffuu15JqmqL3X3ZavbP5HkN7v7R7c81ghVVUn+Pslt3f3G1bLvSvL07v6brQ43wJ7n3rOS/FmSv7uY/g9fVH+NzoequizJDyV5Vc6cKsn6np7kP7Y9xCA/luQrj8U7Sbr7w+J97rr7oZy5IvzVqz+MF4XzfiXmReD6JO/u7n+uqi9W1fd296ltDzXIU6vqniRPSfKcJNdsd5xRXpzEc20h3f3A6k34npXk89ueZwn2wA92U868UVdWX2/a4iwTfbm7v7u7X5jkuiR/cjHtAcE22QPfR1U9M2f2GL+jqjpnLljqqvrV9uLBOevuD1bV5Ul2kjy07XkGuDfJDdse4mJRVd+W5NFcRM89e+D7uyHJW7r7ed19rLuvSvKJJD+85blGWp3Fc0mSL257liHuTPKNq3f0TJJU1XdWleffOaqqnSRvTPJ7F9POlz3w/d2U5Lf3LHv7avkHLvw4Iz12DDxJKsnN3f3oFucZo7u7qn4uyRuq6teT/E+STyZ57TbnGuSx596TkjyS5C1JXr/ViRbmNEKAoRxCARhKwAGGEnCAoQQcYCgBBxhKwAGGEnCAof4PFmv9EP56OckAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.array([\"A\", \"B\", \"C\", \"D\"])\n",
    "y = np.array([3, 8, 1, 10])\n",
    "\n",
    "plt.bar(x, y, color = \"red\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fb75846f",
   "metadata": {},
   "source": [
    "## 颜色名称\n",
    "使用 140 种支持的颜色名称中的任何一种。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "03fefb5f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKcElEQVR4nO3db4xlB1nH8d9jF4RSUUgHhLbL1gQhBP8gE/+Af2KLsVpjMemLNsFUQ7IvGhQMUapv+lYTQzDRQjaIVkRqUkgk1iCESvAPadwtJdJWBAtCEeiAJorBlNbHF3ubLGM7M3vv3b084+eTbObeM3fueXJy9zsnZ865t7o7AMzzTZseAIDlCDjAUAIOMJSAAwwl4ABDHTmfK7v44ov72LFj53OVAOOdOnXqS929tXv5eQ34sWPHcvLkyfO5SoDxqupfHm+5QygAQwk4wFACDjCUgAMMJeAAQwk4wFD7Bryq3lZVD1XVx85Y9syqen9VfWLx9RnndkwAdjvIHvgfJrlq17Kbknygu5+f5AOL+wCcR/sGvLs/lOTfdi2+Jsmti9u3JnnlescCYD/LXon57O7+/OL2F5I8+4keWFXHkxxPkqNHjy65OmC0G+/Y9ASbdcvV5+RpV/4jZp/+SJ8n/Fif7j7R3dvdvb219X8u5QdgScsG/ItV9ZwkWXx9aH0jAXAQywb8PUluWNy+IcmfrWccAA7qIKcRvjPJh5O8oKoerKpXJ/nNJD9RVZ9I8orFfQDOo33/iNnd1z/Bt65c8ywAnAVXYgIMJeAAQwk4wFACDjCUgAMMJeAAQwk4wFACDjCUgAMMJeAAQwk4wFACDjCUgAMMJeAAQwk4wFACDjCUgAMMJeAAQwk4wFACDjCUgAMMJeAAQwk4wFACDjCUgAMMJeAAQwk4wFACDjCUgAMMJeAAQwk4wFACDjDUSgGvql+pqnur6mNV9c6qesq6BgNgb0sHvKouSfLLSba7+8VJLkhy3boGA2Bvqx5COZLkqVV1JMmF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dquY5Bn4AVfWnSZ6b5M7uvnnT80xSVV/p7osWt38yyW90949teKwRqqqS/F2SW7v7LYtl35Pk6d391xsdboBdr71nJfmTJH97mP4PH6rfRudCVV2U5IeTvDqnT5VkeU9P8u+bHmKQH0/ytcfinSTd/VHxPnvd/VBOXxH+msUvxkPhnF+JeQhck+S93f1PVfXlqnppd5/a9FCDPLWq7knylCTPSXLFZscZ5cVJvNbWpLsfWLwJ37OSfHHT86yDPfD9XZ/Tb9SVxdfrNzjLRF/t7u/t7hcmuSrJHx2mPSDYJHvge6iqZ+b0HuN3VVXn9AVLXVW/2v54cNa6+8NVdXGSrSQPbXqeAe5Ncu2mhzgsquo7kjyaQ/Taswe+t2uTvL27n9fdx7r7siSfSvIjG55rpMVZPBck+fKmZxniziTfvHhHzyRJVX13VXn9naWq2kryliS/e5h2vuyB7+36JL+1a9m7Fss/dP7HGemxY+BJUklu6O5HNzjPGN3dVfVzSd5UVW9I8t9JPp3kdZuca5DHXntPSvJIkrcneeNGJ1ozpxECDOUQCsBQAg4wlIADDCXgAEMJOMBQAg4wlIADDPW/35r/ZHzS+w4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.array([\"A\", \"B\", \"C\", \"D\"])\n",
    "y = np.array([3, 8, 1, 10])\n",
    "\n",
    "plt.bar(x, y, color = \"hotpink\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "55ade09a",
   "metadata": {},
   "source": [
    "## 十六进制颜色\n",
    "或者可以使用十六进制颜色值："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "40425328",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiw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+reJE9L8rwkV2x2nFFemsRrbU26+8HFm/A9J8kXNj3POtgD39sNOf1GXVl8vWGDs0z0le7+7u5+cZKrkvzxQdoDgk2yB76Lqnp2Tu8xfkdVdU5fsNRV9Svtjwdnrbs/VFUXJ9lK8vCm5xngviTXbXqIg6Kqvi3JYzlArz174Lu7Lslbu/sF3X2kuy9L8skkP7zhuUZanMVzQZIvbXqWIe5K8o2Ld/RMklTVd1aV199ZqqqtJG9K8rsHaefLHvjubkjyWzuWvWOx/IPnf5yRHj8GniSV5MbufmyD84zR3V1V1yZ5Y1X9WpL/TvKpJK/b5FyDPP7ae0qSR5O8NckbNjrRmjmNEGAoh1AAhhJwgKEEHGAoAQcYSsABhhJwgKEEHGCo/wUEDwEfmzarcAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.array([\"A\", \"B\", \"C\", \"D\"])\n",
    "y = np.array([3, 8, 1, 10])\n",
    "\n",
    "plt.bar(x, y, color = \"#4CAF50\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f5fd6865",
   "metadata": {},
   "source": [
    "# 条形宽度\n",
    "bar() 使用关键字参数 width 来设置条的宽度："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "d84b2200",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKfklEQVR4nO3dbYxlB13H8d/fLgilopAOCLTL1ARLCD6gEx/Ah9hirNZYTPqiTSDVYPZVFQxRV9/0bU0MwUQj2SBaEakJkEioQQiV4ANp3C0l0lYEy4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vjzJZ5P88AHPdagtrga6KMlXDnqWQ+bOJN+4+NTPJElVfWdVeT8coKraSPLWJL+znweW447Ac+Z0yW/uWPaexfKPnv9xDrXHzoEnSSW5qbsfPcB5Dp3u7qr62SRvqapfS/I/SU4neeNBznVIPfZ+eFqSR5K8I8mb93ODYy8jBDjsJp5CASACDjCWgAMMJeAAQwk4wFACDjCUgAMM9X8c/ww6AC5aEQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.array([\"A\", \"B\", \"C\", \"D\"])\n",
    "y = np.array([3, 8, 1, 10])\n",
    "\n",
    "plt.bar(x, y, width = 0.1)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4afc3121",
   "metadata": {},
   "source": [
    "# 条形高度\n",
    "barh() 使用关键字参数 height 来设置条形的高度："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "d426c134",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWsAAAD4CAYAAAAqw8chAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKeUlEQVR4nO3db4xlB1nH8d/jLIYupKtkS8UtcTAh1oZKkdGg+I9CYk2NxcSQNtE0hmR9YRWM0ay+4SV9YRCNRrIBtCBCTIVIqEENGtGoxFmoWUopYi3QpaWAshLbBLo8vpgp1mW3O9u9d+4+nc/nzdw5e+65z9k/3z17zrl7q7sDwMXtm1Y9AADnJtYAA4g1wABiDTCAWAMMsG9ZGz548GCvr68va/MAT0nHjh37QndfdvrypcV6fX09m5uby9o8wFNSVX3qTMudBgEYQKwBBhBrgAHEGmAAsQYYQKwBBhBrgAHEGmCAc74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vhfuYgS+pVGwo4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.array([\"A\", \"B\", \"C\", \"D\"])\n",
    "y = np.array([3, 8, 1, 10])\n",
    "\n",
    "plt.barh(x, y, height = 0.1)\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.10"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
